1. Field of the Invention
The present invention relates to an image processing technique for extracting an image to which a mark has been added and classifying the image based upon the type of mark.
2. Description of the Related Art
There are occasions where one desires to use an image reader such as a scanner to read and store, as digital data, film exposed by an instant camera or a paper medium such as a photograph having a margin. In particular, there is also strong demand for a system in which a plurality of photographs are placed on the document glass of a scanner, the photographs are read at one time, the read images are cropped and each of the cropped images is classified and stored.
In order to satisfy these demands, the specification of Japanese Patent Application Laid-Open No. 2000-165651 (Document 1) discloses a technique in which an image region desired to be cropped (referred to as a “crop region”) on a paper medium is enclosed by a line using a pen or the like and information on the paper medium is identified based upon the color or shape of the line or a symbol in the vicinity of the line. By associating the result of identification and previously registered classification information, a cropped image is stored in a specified folder.
Although Document 1 performs identification by enclosing a crop region on a paper medium by a line using a pen or the like, there is also a technique for identifying a document region automatically. For example, the specification of Japanese Patent Application Laid-Open No. 2003-046731 (Document 2) discloses a technique for automatically detecting the positions and sizes of a plurality of documents that a user has placed on a document glass, and enabling the cropping of each document.
However, in a case where an image region on a paper medium is cropped and classified, as described in Document 1, it is required that all image regions be enclosed by lines using a pen or the like. In other words, the user is forced to perform a complicated operation as preliminary processing for cropping images. Furthermore, since a cropped image is a region enclosed by a line using a pen or the like, it is difficult for the image region itself to be identified accurately.
Further, in a case where the margin of a document having a margin is marked and read using the technique of automatically identifying document regions described in Document 2, there are instances where the mark is detected erroneously as one document region, as illustrated in FIG. 4D, depending upon the position and size of the mark. Further, there are instances where a cropping frame having a size larger than that of the document region is detected as a cropping frame that contains the mark, as illustrated in FIG. 9B. Furthermore, in a case where the document region and the mark are spaced away from each other, as illustrated in FIG. 9C, the cropping frame and the mark cannot be associated with each other correctly even if the cropping frame has been detected correctly.